#include "SingletonTest.h"

SingletonTest* SingletonTest::instance = 0;
//private
SingletonTest::SingletonTest(int r)
{
	this->luckynumber=r;
	cout<<"costruttore"<<endl;
}

SingletonTest* SingletonTest::getInstance(void)
{
	if(instance==0)
		instance=new SingletonTest(std::rand()%100);

	return  instance;
}


int SingletonTest::getNumber(void)
{
	return this->luckynumber;
}

SingletonTest::~SingletonTest(void)
{
}
